package com.chuantou.yuba.api.to;

import java.util.List;

import com.chuantou.yuba.util.Constants;
import com.google.gson.annotations.SerializedName;

public class HotNewsDataTO extends BaseTO {

	@SerializedName("data")
	private HotNewsListTO data;

	public HotNewsListTO getData() {
		return data;
	}

	public void setData(HotNewsListTO data) {
		this.data = data;
	}

	public List<HotNewsTO> getNews() {
		return this.data == null ? null : this.data.getNews();
	}

	@Override
	public boolean hasNextPage() {
		return data != null && data.getNews() != null && data.getNews().size() >= Constants.DEFAULT_PAGE_SIZE;
	}

	@Override
	public int getCurrentPage() {
		return this.data == null ? 1 : this.data.getCurrentPage();
	}
}
